package initialize

import (
	"goim/server/router"
	"goim/server/system/global"
	"strconv"

	"goim/server/system/middleware"

	"github.com/gin-gonic/gin"
)

func Router() {

	engine := gin.Default()
	// CORS中间件
	engine.Use(middleware.Cors())
	router.NverRouter(engine)
	router.WebSocket(engine)
	router.Adminrouter(engine)
	// router.Apiverify(engine)

	go engine.Run(":16966")
	go engine.Run(":16965")
	go engine.Run(":16964")
	go engine.Run(":16963")
	go engine.Run(":16962")
	go engine.Run(":16961")
	go engine.Run(":16960")
	engine.Run(":" + strconv.Itoa(global.JLZS_CONFIG.System.Addr))
}
